home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1996 / MacHack 1996.toast / Hacks / Hacks ’89 / Gas Gauge / Windows / Compatability.h next >
Encoding:
C/C++ Source or Header  |  1988-12-31  |  1.6 KB  |  76 lines  |  [TEXT/KAHL]

  1. /*             Copyright (c) 1988 by Caldera Corporation                        */
  2.     
  3. /*            PO box 3252, Ann Arbor, MI 48106   (313) 996-9059                */
  4.  
  5. /*        File:         Compatability.c
  6.         Compilers:     LightSpeedC 3.0, Aztec C 3.0                            */
  7.  
  8. /*        Abstract:                                                            */
  9. /*            high level and code segment 1 routines for windowTile            */
  10.  
  11. /*        History:                                                            */
  12. /*            12/31/88 1.0c - released final 1.0 version                         */
  13.  
  14.  
  15. #ifndef    __COMPATABILITY__
  16. #define    __COMPATABILITY__        1        /* compatability already included    */
  17.  
  18.  
  19. #define LIGHTSPEED                1        /* LightspeedC development system    */
  20. #ifdef LIGHTSPEED                        /* if LightspeedC currently in use    */
  21.  
  22.  
  23. #ifndef RETURN        /* some compilers require "return()" in void functions    */
  24. #define RETURN            return
  25. #endif
  26.  
  27.  
  28. #ifndef pass        /* some compilers can't pass Point structure variables    */
  29. #define pass(A)            (A)
  30. #endif
  31.  
  32.  
  33. #define ptpass(A)        (A)        /* some compilers pass Point variables to     */
  34.                     /* by reference rather than by value Toolbox routines     */
  35.  
  36.  
  37. #define USTRLEN(A)        ((unsigned)((char*)(A)[0]))
  38.                         /* some compilers define strings as composite data     */
  39.                         /* structures rather than simple character arrays     */
  40. #endif    
  41.  
  42. #ifdef AZTEC                            /* if Aztec C is currently in use    */
  43. #ifndef RETURN
  44. #define RETURN            return()
  45. #endif
  46.  
  47. #define    ptpass(A)        (*((long*)&(A)))
  48.  
  49. #define    USTRLEN(A)        ((unsigned)(*((Ptr)(&(A)))))
  50. #endif
  51.  
  52.  
  53. #ifdef MPWGC                            /* if MPW C is currently in use        */
  54. #ifndef RETURN
  55. #define RETURN            return
  56. #endif
  57.  
  58. #ifndef pass
  59. #define pass(A)            (A)
  60. #endif
  61.  
  62. #define ptpass(A)        (&(A))
  63.  
  64. #define USTRLEN(A)        ((unsigned)((A).length))
  65.  
  66. #define TRUE            ((Boolean)1)
  67. #define FALSE            ((Boolean)0)
  68. #endif
  69.  
  70.  
  71. #ifndef NULL
  72. #define NULL            0L
  73. #endif
  74.  
  75. #endif    __COMPATABILITY__
  76.